﻿<!DOCTYPE html>

<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>继承</title>
    <script src="../scripts/inherit.js"></script>
    <script>
        function say() {
            var o = {};
            o.x = 1;
            var p = inherit(o);
            p.y = 2;
            var q = inherit(p);
            q.z = 3;
            q.x = 2;
            alert(q.x + "------" + o.x);
        }

    </script>

</head>
<body onload="say();">


</body>
</html>